import request from '@/router/axios'

export function fetchWxGiftList(query) {
  return request({
    url: '/mp/wxgift/page',
    method: 'get',
    params: query
  })
}

export function getWxGiftList() {
  return request({
    url: '/mp/wxgift/public/getGiftList',
    method: 'get'
  })
}

export function addWxGiftObj(obj) {
  return request({
    url: '/mp/wxgift',
    method: 'post',
    data: obj
  })
}

export function getWxGiftObj(id) {
  return request({
    url: '/mp/wxgift/' + id,
    method: 'get'
  })
}

export function delWxGiftObj(id) {
  return request({
    url: '/mp/wxgift/' + id,
    method: 'delete'
  })
}

export function putWxGiftObj(obj) {
  return request({
    url: '/mp/wxgift',
    method: 'put',
    data: obj
  })
}
